package com.edu.edu.week_project01.activity.activity;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Administrator on 10/11 0011.
 */
public class getSystemTime {

    public static String getTime(String url){
        SimpleDateFormat format = new SimpleDateFormat("MMddHHmm");
        Date date = new Date(System.currentTimeMillis());
        String time = format.format(date);
        String newUrl = url.replace("@d", time);
        return newUrl;
    }
    public static String systemTime(){
        SimpleDateFormat format = new SimpleDateFormat("MMddHHmm");
        Date date = new Date(System.currentTimeMillis());
        String time = format.format(date);
        return time;
    }
}
